from flask_migrate import Migrate, MigrateCommand
from flask_script import Manager

from application import create_app, db

if __name__ == '__main__':
    app = create_app('settings')

    migrate = Migrate(app, db)

    manager = Manager(app)
    manager.add_command('db', MigrateCommand)

    manager.run()
